import http from '@/utils/request'
// 登录接口
export const reqLogin = obj => {
  return http({
    method: 'post',
    url: '/sys/login',
    data: obj
  })
}

// 获取个人信息资料的接口
export const reqGetUserInfo = () => {
  return http({
    method: 'post',
    url: '/sys/profile'
  })
}

// 获取员工基本信息(头像字段)
export const reqGetUserDetailById = id => {
  return http({
    method: 'get',
    url: `/sys/user/${id}`
  })
}

/** *
 * 保存员工的基本信息
 * **/
export function reqSaveUserDetailById(data) {
  return http({
    method: 'put',
    url: `/sys/user/${data.id}`,
    data
  })
}
